package org.example.ftp.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Properties;

@Configuration
public class MybatisPluginConfig {

    // 注册插件
    @Bean
    public MybatisPageInterceptor mybatisPageInterceptor() {
        MybatisPageInterceptor mybatisPageInterceptor = new MybatisPageInterceptor();
        // 设置参数，比如阈值，可以在配置文件中设置
        Properties properties = new Properties();
        properties.setProperty("time","1");
        mybatisPageInterceptor.setProperties(properties);
        return mybatisPageInterceptor;
    }
}
